package com.shiwaixiangcun.customer.adapter;

import android.support.annotation.Nullable;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shiwaixiangcun.customer.R;
import com.shiwaixiangcun.customer.entity.MonthItemEntity;

import java.util.List;

/**
 * Author   Administrator
 * Date     2018/4/10
 * Desc     eg
 *
 * @author Administrator
 */
public class AdapterFeeRecord extends BaseQuickAdapter<MonthItemEntity, BaseViewHolder> {
    public AdapterFeeRecord(@Nullable List<MonthItemEntity> data) {
        super(R.layout.item_fee_record, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MonthItemEntity item) {
        helper.setText(R.id.tv_date_name, item.getName());
        RecyclerView recyclerView = helper.getView(R.id.rv_fee_item);
        AdapterFeeItem adapterFeeItem = new AdapterFeeItem(item.getList());
        recyclerView.setLayoutManager(new LinearLayoutManager(mContext));
        recyclerView.setAdapter(adapterFeeItem);

    }
}
